import socket
s=socket.socket()
s.bind(('localhost',8888))
s.listen(8)
c,a=s.accept()
while True:
    data = c.recv(1000)
    print repr(data)
    if not data:
        break